﻿using Rj_GsInsurance.Client.ControlsLookup;
using Rj_GsInsurance.Client.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wpf.Ui.Controls;

namespace Rj_GsInsurance.Client.Pages
{
    /// <summary>
    /// DevUploadPage.xaml 的交互逻辑
    /// </summary>
    [GalleryPage("科室上传", SymbolRegular.Doctor24)]
    public partial class DevUploadPage : INavigableView<DevUploadViewModel>
    {
        public DevUploadViewModel ViewModel { get; }

        public DevUploadPage(DevUploadViewModel viewModel)
        {
            ViewModel = viewModel;
            DataContext = this;
            InitializeComponent();
        }

        private void DataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            if (string.IsNullOrEmpty((e.PropertyDescriptor as System.ComponentModel.PropertyDescriptor).Description))
            {
                e.Column.Visibility = Visibility.Collapsed;
            }
            else
            {
                e.Column.Header = (e.PropertyDescriptor as System.ComponentModel.PropertyDescriptor).Description;
            }
        }
    }
}
